
import { Layout } from 'antd';
import { useState } from 'react'
// 导入中央事件总线
import eventBus from '@/utils/myevents'
// 导入menu 菜单
import Appmenu from './Appmenu';
const { Sider } = Layout;
type Props = {}

export default function Appsider({ }: Props) {
    const [collapsed, setCollapsed] = useState(false);
    eventBus.on('myevent', (data) => {
        //console.log('data', data);
        setCollapsed(data)
    });
    return (
        <Sider trigger={null} collapsible collapsed={collapsed}>
            <div className="demo-logo-vertical" />
            {/* 放在menu 菜单 */}
            <Appmenu></Appmenu>
        </Sider>
    )
}